package com.oracle.oa.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity                        
@Table(name="accessory_file")
public class Accessoryfile  implements java.io.Serializable {

	 private static final long serialVersionUID = 1L;
	 @GenericGenerator(name = "generator", strategy = "increment")
	 @Id
	 @GeneratedValue(generator = "generator")
	 @Column(name = "accessoryid", unique = true, nullable = false)
     private int accessoryid;
	 @ManyToOne
 	 @JoinColumn(name = "fileinfo_id")
     private Fileinfo fileinfo;
	 @ManyToOne
 	 @JoinColumn(name = "filetypeinfo_id")
     private Filetypeinfo filetypeinfo;
	 
	 @Column(name = "accessoryname", length = 64)
     private String accessoryname;
	 
	 @Column(name = "accessorysize")
     private int accessorysize;
	 
	 @Column(name = "ifdelete")
     private int ifdelete;
	 
	 @Column(name = "createdate")
     private Date createdate;
	 
	 @Column(name = "accessorypath")
     private String accessorypath;
	public int getAccessoryid() {
		return accessoryid;
	}
	public void setAccessoryid(int accessoryid) {
		this.accessoryid = accessoryid;
	}
	public Fileinfo getFileinfo() {
		return fileinfo;
	}
	public void setFileinfo(Fileinfo fileinfo) {
		this.fileinfo = fileinfo;
	}
	public Filetypeinfo getFiletypeinfo() {
		return filetypeinfo;
	}
	public void setFiletypeinfo(Filetypeinfo filetypeinfo) {
		this.filetypeinfo = filetypeinfo;
	}
	public String getAccessoryname() {
		return accessoryname;
	}
	public void setAccessoryname(String accessoryname) {
		this.accessoryname = accessoryname;
	}
	public int getAccessorysize() {
		return accessorysize;
	}
	public void setAccessorysize(int accessorysize) {
		this.accessorysize = accessorysize;
	}
	public int getIfdelete() {
		return ifdelete;
	}
	public void setIfdelete(int ifdelete) {
		this.ifdelete = ifdelete;
	}
	public Date getCreatedate() {
		return createdate;
	}
	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}
	public String getAccessorypath() {
		return accessorypath;
	}
	public void setAccessorypath(String accessorypath) {
		this.accessorypath = accessorypath;
	}
	public Accessoryfile(int accessoryid, Fileinfo fileinfo,
			Filetypeinfo filetypeinfo, String accessoryname, int accessorysize,
			int ifdelete, Date createdate, String accessorypath) {
		this.accessoryid = accessoryid;
		this.fileinfo = fileinfo;
		this.filetypeinfo = filetypeinfo;
		this.accessoryname = accessoryname;
		this.accessorysize = accessorysize;
		this.ifdelete = ifdelete;
		this.createdate = createdate;
		this.accessorypath = accessorypath;
	}
	public Accessoryfile() {
		super();
		// TODO Auto-generated constructor stub
	}
	@Override
	public String toString() {
		return "Accessoryfile [accessoryid=" + accessoryid + ", fileinfo="
				+ fileinfo + ", filetypeinfo=" + filetypeinfo
				+ ", accessoryname=" + accessoryname + ", accessorysize="
				+ accessorysize + ", ifdelete=" + ifdelete + ", createdate="
				+ createdate + ", accessorypath=" + accessorypath + "]";
	}



}